﻿<Window x:Class="WpfW3cSvgTestSuite.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="W3C SVG 1.1 Full Test Suite" Height="589" Width="719">
    <DockPanel LastChildFill="True" Margin="3">
        <!-- Top directory source panel -->
        <Border DockPanel.Dock="Top" BorderBrush="Gray" BorderThickness="1" CornerRadius="8" Margin="0, 3, 0, 3">
            <DockPanel Margin="3" HorizontalAlignment="Stretch" LastChildFill="True">
                <TextBlock Name="lblSvgSuitePath" FontWeight="Bold" DockPanel.Dock="Left" VerticalAlignment="Center" Margin="3">W3C Svg Suite Path:</TextBlock>
                <Button Name="btnSvgSuitePath" DockPanel.Dock="Right" HorizontalAlignment="Right" Margin="3" Content="Browse..." Click="OnBrowseForSvgSuitePath"/>
                <TextBox Name="txtSvgSuitePath" HorizontalAlignment="Stretch" Margin="3" TextChanged="OnSvgSuitePathTextChanged" />
            </DockPanel>            
        </Border>
        
        <!-- Bottom status panel -->
        <Border BorderBrush="Gray" BorderThickness="1" CornerRadius="8" DockPanel.Dock="Bottom" Margin="0, 3, 0, 3">
            <StackPanel Orientation="Vertical">   
                <DockPanel Margin="3" LastChildFill="True">                    
                    <TextBlock Name="testDescritionLabel" DockPanel.Dock="Left" Text="Test Description: " FontSize="12" FontWeight="Bold" TextAlignment="Left" TextTrimming="CharacterEllipsis" TextWrapping="NoWrap"/>
                    <TextBlock Name="testDescrition" FontSize="12" TextAlignment="Left" TextTrimming="None" TextWrapping="Wrap"/>
                </DockPanel>
                 <DockPanel Margin="3" LastChildFill="True">                    
                    <TextBlock Name="testFilePathLabel" DockPanel.Dock="Left" Text="Test File Path: " FontSize="12" FontWeight="Bold" TextAlignment="Left" TextTrimming="CharacterEllipsis" TextWrapping="NoWrap"/>
                    <TextBox Name="testFilePath" FontSize="12" Margin="18, 0, 0, 6" TextAlignment="Left" HorizontalAlignment="Stretch" IsReadOnly="True" TextWrapping="NoWrap"/>
                </DockPanel>
           </StackPanel>
        </Border>
        
        <!-- The main content panel -->
        <Border BorderBrush="Gray" BorderThickness="1" CornerRadius="8">
            <Grid Name="mainGrid" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" MinWidth="24"/>
                    <ColumnDefinition Width="8"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Expander Name="leftExpander" Grid.Row="0" Grid.Column="0" IsExpanded="True" ExpandDirection="Left">
                    <Expander.Header>
                        <TextBlock Text="W3C SVG Test Suite" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" FontSize="14">                
                        <TextBlock.LayoutTransform>
                            <RotateTransform Angle="90" />
                        </TextBlock.LayoutTransform>
                        </TextBlock>
                    </Expander.Header>
                    <!-- The Left Pane contents -->
                    <Border BorderBrush="Gray" Margin="3" Padding="0" BorderThickness="1">
                        <DockPanel>                        
                            <Grid Name="bottomGrid">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="250*"/>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="Auto" MinHeight="24"/>
                                </Grid.RowDefinitions>
                                <TreeView Name="treeView" Grid.Row="0" HorizontalAlignment="Stretch" IsTextSearchEnabled="True" TreeViewItem.Collapsed="OnTreeViewItemCollapsed" TreeViewItem.Expanded="OnTreeViewItemExpanded" TreeViewItem.Selected="OnTreeViewItemSelected" TreeViewItem.Unselected="OnTreeViewItemUnselected" />
                                <GridSplitter Name="bottomSplitter" Margin="0, 3, 0, 0" Grid.Row="1" Height="6" HorizontalAlignment="Stretch" VerticalAlignment="Center" BorderThickness="1" BorderBrush="Gray" Background="LightGray"/>
                                
                                <!-- The Left-Bottom Expander/Contents -->
                                <Expander Name="bottomExpander" Grid.Row="2" IsExpanded="True" ExpandDirection="Down">
                                    <Expander.Header>
                                        <TextBlock Text="Selected Test State" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" FontSize="14"/>              
                                    </Expander.Header>
                                    <StackPanel Name="testInfoPanel" Orientation="Vertical" Margin="3">                                        
                                        <TextBlock Text="Test State:"/>
                                        <ComboBox Name="stateComboBox" Margin="32, 0, 0, 6" SelectionChanged="OnStateSelectionChanged">
                                            <ComboBoxItem Tag="unknown">
                                                <StackPanel Orientation="Horizontal">
                                                    <Ellipse Width="16" Height="16" Fill="LightGray" Stroke="DarkGray" StrokeThickness="2"/>
                                                    <TextBlock Text="Unknown" Margin="3"/>
                                                </StackPanel>
                                            </ComboBoxItem>
                                            <ComboBoxItem Tag="failure">
                                                <StackPanel Orientation="Horizontal">
                                                    <Ellipse Width="16" Height="16" Fill="Red" Stroke="DarkGray" StrokeThickness="2"/>
                                                    <TextBlock Text="Failure" Margin="3"/>
                                                </StackPanel>
                                            </ComboBoxItem>
                                            <ComboBoxItem Tag="success">
                                                <StackPanel Orientation="Horizontal">
                                                    <Ellipse Width="16" Height="16" Fill="Green" Stroke="DarkGray" StrokeThickness="2"/>
                                                    <TextBlock Text="Success" Margin="3"/>
                                                </StackPanel>
                                            </ComboBoxItem>
                                            <ComboBoxItem Tag="partial">
                                                <StackPanel Orientation="Horizontal">
                                                    <Ellipse Width="16" Height="16" Fill="Yellow" Stroke="DarkGray" StrokeThickness="2"/>
                                                    <TextBlock Text="Partial" Margin="3"/>
                                                </StackPanel>
                                            </ComboBoxItem>
                                        </ComboBox>
                                        <TextBlock Text="Test Comment:"/>
                                        <TextBox Name="testComment" TextWrapping="Wrap" Margin="32, 0, 0, 6" AcceptsReturn="False" AcceptsTab="False" Height="72" SpellCheck.IsEnabled="True" TextChanged="OnCommentTextChanged"/>
                                        <Button Name="testApply" Content="Apply" Padding="3" HorizontalAlignment="Right" Click="OnApplyTestState"/>
                                    </StackPanel>
                                </Expander>
                            </Grid>
                        </DockPanel>
                    </Border>
                </Expander>
                <GridSplitter Name="leftSplitter" Grid.Row="0" Grid.Column="1" BorderThickness="1" BorderBrush="Gray" Background="LightGray"
                          HorizontalAlignment="Center" Width="6" VerticalAlignment="Stretch"/>
                <TabControl Margin="6" Grid.Row="0" Grid.Column="2">
                    <TabItem Name="tabDrawing" Header="Drawing">
                        <Frame Name="frameDrawing" Source="DrawingPage.xaml"/>
                    </TabItem>
                    <TabItem Name="tabXamlOutput" Header="Xaml Output">
                        <Frame Name="frameXamlOutput" Source="XamlPage.xaml"/>
                    </TabItem>
                    <TabItem Name="tabSvgInput" Header="Svg Input">  
                        <Frame Name="frameSvgInput" Source="SvgPage.xaml"/>
                    </TabItem>
                </TabControl>            
            </Grid>
        </Border>
    </DockPanel>
</Window>
